#pragma once
#include"Utility.h"

const int   maxqueue = 10; //    small value for testing

typedef char Queue_entry;

class Deque
{
public:
	Deque();
	bool empty()const;
	Error_code serve_front();
	Error_code serve_rear();
	Error_code append_front(const Queue_entry& item);
	Error_code append_rear(const Queue_entry& item);
	Error_code retrieve_front(Queue_entry& item)const;
	Error_code retrieve_rear(Queue_entry& item)const;
private:
	Queue_entry entry[maxqueue];
	int front, rear;
};
